package com.rc.saas.tenant.client;

import com.rc.saas.tenant.common.vo.StdRequest;
import com.rc.saas.tenant.common.vo.TResponse;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 打印机服务
 * Created by Sven on 2021/04/11
 */
@Component
public class PrinterClientRouter {
    private static Logger logger = LogManager.getLogger(PrinterClientRouter.class);

    @Autowired
    private PrinterClient1 printerClient1;

    /**
     * 发送打印指令
     */
    public TResponse query_start_charge(StdRequest tRequest) {
        return printerClient1.query_start_print(tRequest);
    }

    /**
     * 重置打印小票次数
     */
    public TResponse query_reset_print(StdRequest tRequest) {
        return printerClient1.query_reset_print(tRequest);
    }

    /**
     * 凭空打印接口
     * RequestMapping路径是服务提供方的路径
     * @param tRequest
     * @return
     */
    public TResponse query_nothing_print(@RequestBody StdRequest tRequest){
        return printerClient1.query_nothing_print(tRequest);
    }
}
